<?php

namespace App\Requests;

use Framework\BaseRequest;

/**
 * @method password_confirmation
 * @method password
 * @method code
 * @method phone
 */
class ForgetPasswordRequest extends BaseRequest
{
    public function rules()
    {
        return [
            'phone' => [
                'required',
                'regex:/^13\d{9}$|^14\d{9}$|^15\d{9}$|^16\d{9}$|^17\d{9}$|^18\d{9}|^19\d{9}$/',
                ],

            'password' => 'required',
            'password_confirmation'=> 'required',
            'code' => [
                'required',
                'int',
//                'max:4'
            ],
        ];
    }
}
